<extend name="$_home_public_layout"/>

<block name="main">
    <div class="navbar theme-white">
        <div class="navbar-inner">
            <div class="left">
                <a href="__ROOT__/" class="link back">
                    <i class="icon icon-back"></i>
                    <span>返回</span>
                </a>
            </div>
            <div class="center">{$meta_title}</div>
            <div class="right">
                <a href="{:U('User/User/login')}" class="link ">
                    <span>登录</span>
                </a>
            </div>
        </div>
    </div>

    <div class="page no-toolbar {$_page_name}" data-page="{$_page_name}">
        <div class="page-content">
            <div class="content-block">
                <?php
                    $allow_reg_type = C('user_config.allow_reg_type');
                ?>
                <div class="buttons-row">
                    <a href="#reset1" class="tab-link button active">通过邮箱重置</a>
                    <?php if(in_array('mobile', $allow_reg_type)): ?>
                        <a href="#reset2" class="tab-link button">通过手机重置</a>
                    <?php endif; ?>
                </div>
            </div>
            <div class="tabs">
                <div id="reset1" class="tab active">
                    <form action="{:U('User/User/reset_password')}" method="post" class="form reset-form-email">
                        <div class="list-block">
                            <ul>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">邮箱</div>
                                            <div class="item-input">
                                                <input type="text" name="email" placeholder="请输入邮箱">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">验证码</div>
                                            <div class="item-input">
                                                <div class="row">
                                                    <div class="col-50">
                                                        <input type="text" name="verify" placeholder="验证码">
                                                    </div>
                                                    <div class="col-50">
                                                        <a style="padding: 0 5px;margin-top: 5px;" href="#" class="button color-orange button-fill send-mail-verify" data-title="密码重置">发送验证码</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">新密码</div>
                                            <div class="item-input">
                                                <input type="text" name="password" placeholder="请输入新密码">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="list-block">
                            <input type="hidden" name="reg_type" value="email">
                            <ul>
                                <li><a href="#" type="submit" class="submit item-link list-button ajax-post" target-form="reset-form-email">重置密码</a></li>
                            </ul>
                        </div>
                    </form>
                </div>
                <div id="reset2" class="tab">
                    <form action="{:U('User/User/reset_password')}" method="post" class="form reset-form-mobile">
                        <div class="list-block">
                            <ul>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">手机号</div>
                                            <div class="item-input">
                                                <input type="text" name="mobile" placeholder="请输入手机号">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">验证码</div>
                                            <div class="item-input">
                                                <div class="row">
                                                    <div class="col-50">
                                                        <input type="text" name="verify" placeholder="验证码">
                                                    </div>
                                                    <div class="col-50">
                                                        <a style="padding: 0 5px;margin-top: 5px;" href="#" class="button color-orange button-fill send-mobile-verify" data-title="密码重置">发送验证码</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="item-content">
                                        <div class="item-inner">
                                            <div class="item-title label">新密码</div>
                                            <div class="item-input">
                                                <input type="text" name="password" placeholder="请输入新密码">
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="list-block">
                            <input type="hidden" name="reg_type" value="mobile">
                            <ul>
                                <li><a href="#" type="submit" class="submit item-link list-button ajax-post" target-form="reset-form-mobile">重置密码</a></li>
                            </ul>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>
